package domain.models;

import java.util.List;

import controllers.DomainController;

import domain.*;

public class RankingTableModel extends MyTableModel {

	private List<Player> data;

	public RankingTableModel(DomainController domainController) {
		super(domainController);
		String[] columnHeadersGamesTable = {"Naam", "Aantal punten", "Aantal gespeelde partijen"};
		super.setColumnHeaders(columnHeadersGamesTable);
		data = domainController.showRanking();
	}

	@Override
	public Object getValueAt(int rowI, int colI) {
		return data.get(rowI).toRankingTable()[colI];
	}

	@Override
	public int getRowCount() {
		return data.size();
	}
}
